package com.qm.console.component.util;

import java.util.Random;

/**
 * @Auther: jlyin
 * @Date: 2018/8/2 19:52
 * @Description:
 */
public class GenPhoUtil {


    private static String[] telFirst="134,135,136,137,138,139,150,151,152,157,158,159,130,131,132,155,156,133,153".split(",");
    private static int[] kuai3Win={24000,8000,4000,2500,1600,1200,1000,900};
    public static String getTel() {
        int index=getNum(0,telFirst.length-1);
        String first=telFirst[index];
        String second="****";
        String third=String.valueOf(getNum(1,9100)+10000).substring(1);
        return first+second+third;
    }

    public static String getRobotTel() {

        String first="100";
        String third=String.valueOf(getNum(1,91000000)+100000000).substring(1);
        return first+third;
    }


    public static String getRealTel() {
        int index=getNum(0,telFirst.length-1);
        String first=telFirst[index];
        String third=String.valueOf(getNum(1,91000000)+100000000).substring(1);
        return first+third;
    }

    public static int getNum(int start,int end) {
        return (int)(Math.random()*(end-start+1)+start);
    }

    public static int getWinNum(int mainGameId) {
        int winNum;
        if (mainGameId==2||mainGameId==3)
        {
            Random random = new Random();
            int grade = random.nextInt(8);
            winNum = kuai3Win[grade];
        }else {
            Random random1 = new Random();
            winNum = random1.nextInt(10000)+1000;
        }
        return winNum;

    }

    public static void main(String[] args){
        System.out.println(getRobotTel());
    }

}
